clear all
use data/judgeyear.dta
drop if year < 1974

foreach y in numops numdisc numwords numwords_maj_m numtoc_maj_m poscites_m distcites_m negcites_m outstatecites_m discusscites_m quotecites_m {
gen log`y' = log(1+`y')
eststo: quietly reg log`y' i.year 			logsal c.mandeither#c.logsal, 		 vce(cluster stateabb)
eststo: quietly areg log`y' i.year i.statefe#c.year 	logsal c.mandeither#c.logsal, absorb(statefe) vce(cluster stateabb)
eststo: quietly areg log`y' i.year i.statefe#c.year 	logsal c.mandeither#c.logsal, absorb(judgefe) vce(cluster stateabb)
}

esttab using tables/salary-2-disc.csv, nogaps replace ar2 se drop(_cons *year ) star(+ 0.10 * 0.05 ** 0.01)
